package com.ruoyi.project.inspection.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.inspection.mapper.ViProcessClassMapper;
import com.ruoyi.project.inspection.domain.ViProcessClass;
import com.ruoyi.project.inspection.service.IViProcessClassService;

/**
 * 车辆检测进度条分类模板Service业务层处理
 * 
 * @author ruoyi
 * @date 2020-07-17
 */
@Service
public class ViProcessClassServiceImpl implements IViProcessClassService 
{
    @Autowired
    private ViProcessClassMapper viProcessClassMapper;

    /**
     * 查询车辆检测进度条分类模板
     * 
     * @param id 车辆检测进度条分类模板ID
     * @return 车辆检测进度条分类模板
     */
    @Override
    public ViProcessClass selectViProcessClassById(Long id)
    {
        return viProcessClassMapper.selectViProcessClassById(id);
    }

    /**
     * 查询车辆检测进度条分类模板列表
     * 
     * @param viProcessClass 车辆检测进度条分类模板
     * @return 车辆检测进度条分类模板
     */
    @Override
    public List<ViProcessClass> selectViProcessClassList(ViProcessClass viProcessClass)
    {
        return viProcessClassMapper.selectViProcessClassList(viProcessClass);
    }

    /**
     * 新增车辆检测进度条分类模板
     * 
     * @param viProcessClass 车辆检测进度条分类模板
     * @return 结果
     */
    @Override
    public int insertViProcessClass(ViProcessClass viProcessClass)
    {
        viProcessClass.setCreateTime(DateUtils.getNowDate());
        return viProcessClassMapper.insertViProcessClass(viProcessClass);
    }

    /**
     * 修改车辆检测进度条分类模板
     * 
     * @param viProcessClass 车辆检测进度条分类模板
     * @return 结果
     */
    @Override
    public int updateViProcessClass(ViProcessClass viProcessClass)
    {
        return viProcessClassMapper.updateViProcessClass(viProcessClass);
    }

    /**
     * 批量删除车辆检测进度条分类模板
     * 
     * @param ids 需要删除的车辆检测进度条分类模板ID
     * @return 结果
     */
    @Override
    public int deleteViProcessClassByIds(Long[] ids)
    {
        return viProcessClassMapper.deleteViProcessClassByIds(ids);
    }

    /**
     * 删除车辆检测进度条分类模板信息
     * 
     * @param id 车辆检测进度条分类模板ID
     * @return 结果
     */
    @Override
    public int deleteViProcessClassById(Long id)
    {
        return viProcessClassMapper.deleteViProcessClassById(id);
    }
}
